#!/usr/bin/python
# coding:utf-8

import gol


def print_log(log):
    print_log_flg = gol.get_value('printLog')
    if print_log_flg == "On":
        print(log)
        email_msg = gol.get_value('emailMsg')
        email_msg += "\n" + str(log)
        gol.set_value('emailMsg', email_msg)
